import java.util.Scanner;

public class Solution {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String arr = scanner.nextLine();
        int a = 0;
        int b = 0;
        int tmp = 1;
        for(int i = 0; i < arr.length(); i++) {
            while (i < arr.length()&&arr.charAt(i) != '.') {
                while(i < arr.length() && arr.charAt(i) == '<') {
                    i++;
                    tmp++;
                }
                while(i < arr.length() && arr.charAt(i) == '>') {
                    i++;
                    tmp--;
                }
            }
            if(i < arr.length()) {
                tmp = tmp % 4;
                if(tmp == 1 || tmp == -3) {
                    a++;
                }
                if(tmp == -2 || tmp ==2) {
                    b++;
                }
                if(tmp == -1 || tmp == 3) {
                    a--;
                }
                if(tmp == 0) {
                    b--;
                }
            }
        }
        System.out.println("[" + a + "," + b + "]");
    }
}
